<?php session_start();
define('In_Admin', true);
// BEGIN OP. functions
if(isset($_POST['op'])) {
$_GET['op'] = $_POST['op']; $op = $_POST['op'];
require('functions.php');
if($op == '1') { // BEGIN change license funcs.
   $error = login_check($_POST);
if(($error=='new' || $error=='') && power($_POST['username']) == 'Administrator') { 
$license = $_POST['lice_1'].'-'.$_POST['lice_2'].'-'.$_POST['lice_3'].'-'.$_POST['lice_4'];
$fp = @fopen('license.oplf',"w+");
fwrite($fp, $license);
fclose($fp);
die('<b>oPanel Notice:</b> Your license code has been updated. <a href="index.php">Click here to return to the index.</a><br /><br />');
} else { die('<b>oPanel Error:</b> The Administrator details your entered either where incorrect or the user does not have administrator powers. <a href="index.php?op=1">Please Click here to try again.</a><br /><br />'); }
} // END change license funcs.
} // END OP. functions
if(!isset($_SESSION["pass"])) {
  header("Location: ./?redirect=admin"); exit;
} include('functions.php');
if ($_SESSION["pass"] != check($_SESSION["user"])) {
  header("Location: ./?redirect=admin"); exit;
} if($_SESSION["power"] != 'Administrator') {
header("Location: ./"); exit;
} if(isset($_POST['user'])) {
include('admin/adduser.php'); } ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="favicon.ico" />
<style type="text/css">@import url("admin/style.css");</style>
<!--[if lt IE 7]>
<style type="text/css" media="screen">
#menuh{float:none;}
body{behavior:url('admin/csshover.htc'); font-size:100%;}
#menuh ul li{float:left; width: 100%;}
#menuh a{height:1%;font:bold 0.7em/1.4em arial, sans-serif;}
</style>
<![endif]-->
		<script type='text/javascript'>
			//<![CDATA[
		  		if (top.location != self.location) { top.location = self.location }
				var use_enhanced_js = 1;
			//]]>
		</script>
		<script type="text/javascript" src='admin/xmlhttprequest.js'></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>oPanel V<?php echo $ver; ?> - Administration</title>
<script type="text/javascript" src="admin/content.js"></script>
<script type="text/javascript">
<!--
	var screenW = screen.width;
	var imgwidth = screen.width-298;
	var navwidth = (imgwidth/screenW)*100;
	navwidth = Math.floor(navwidth)
	document.write ('<style> #newsWrapper { width: ' +navwidth+ '%; } </style>');
-->
</script>
</head>
<body onload="showContent('main')">
<div id="logowrapper"><img border="0" src="admin/images/admin-logo.png" alt="oPanel V<?php echo $ver; ?> Administration" width="267" height="103" /></div>
<div id="header"><img src="admin/images/headerpt1.gif" alt="" width="269" height="105" /><div id="newsFix"><img src="admin/images/headerpt1_2.gif" alt="" width="74" height="105" /></div><div id="newsWrapper"><marquee><?php echo $_SESSION['oPinfo']['NEWS']; ?></marquee></div>
</div>
<center><div id="navwapper">
<div id="menuh-container">
<div id="menuh">
  <ul> 
    <li><a href="javascript:showContent('main')">Dashboard </a></li>
  </ul>
  <ul>
    <li><a href="#" class="parent">User Administration</a> 
      <ul> 
        <li><a href="javascript:showContent('addusr')">Add User</a></li> 
        <li><a href="javascript:showContent('banList')">Banned Users / IPs</a></li>
        <li><a href="javascript:showContent('listusr')">List Users</a></li> 
        <li><a href="javascript:showContent('usr_setup')">User Settings</a></li>
		<li><a href="javascript:showContent('aban_setup')">Auto Ban Settings</a></li>
      </ul> 
    </li>
  </ul>
  <ul>  
    <li><a href="#" class="parent">General Administration</a> 
      <ul> 
        <li><a href="javascript:showContent('logs')">Security Logs</a></li> 
        <li><a href="javascript:showContent('support')">V3 Support</a></li>
        <li><a href="javascript:showContent('bugRep')">Report a bug</a></li>
		<li><a href="javascript:showContent('lice_adm')">License Admin</a></li>
		<li><a href="javascript:showContent('update')">oPaenl updater</a></li>
      </ul> 
    </li>
  </ul>
</div>
</div>
</div>
</center>
<div align="left" id="content">If you're reading this message the page content has not loaded, this could either be because you're using a browser with JavaScripts disabled, or your browser doesn't support AJAX</div>
<div class="credits" id="credits"><center>oPanel &copy; <a href="http://olliespage.net" class="credits" target="body">OlliesPage.net</a><br />
Licensed to: <?php echo $_SESSION['oPinfo']['REG_TO']; ?></center></div>
</body>
</html>